package com.ehualu.getes.until;


import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBConnection {


    static Connection con = null;

    public static Connection getehldb() {


        try {
            Class.forName("oracle.jdbc.driver.OracleDriver");
//			System.out.println("mysql driver load successfully!");
            con = DriverManager.getConnection("jdbc:oracle:thin:@//37.158.98.10:1521/orcl",
                    "ehl_its", "ehl1234");
            System.out.println("ehl db Connection create!");
        } catch (ClassNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        return con;
    }


    public static Connection getcon() {

        if (con == null) {

            getehldb();
        }
        return con;

    }

}
